1. Field of the Invention
The present invention relates to a spot welding system for measuring a welding point position at which welding is performed.
2. Description of the Related Art
In the conventional invention, a spot welding system including a spot welding gun and a robot has been known. The robot moves a workpiece or the spot welding gun. Then, the robot adjusts a relative position between electrodes of the spot welding gun and the workpiece. The spot welding gun sandwiches a metal plate or the like by a pair of electrodes. Then, the spot welding gun performs spot welding at a welding position (welding point) by applying a voltage between the electrodes.
In such a robot system, an accurate position of the workpiece is preferably obtained before performing an actual welding operation in order to weld the workpiece at a desired position of welding point. In other words, an accurate position of welding point is preferably determined in advance.
Japanese Laid-open Patent Publication No. 2011-88175A discloses a spot welding system including a spot welding gun and a robot which holds the spot welding gun. In the spot welding system, while a movable electrode and a workpiece to be welded which are separated from each other are made to move close to each other, an electric current or a torque of a servomotor is monitored. Then, in the spot welding system, a surface position of the workpiece to be welded is detected based on a position of the movable electrodes and a position of the multi-articulated robot when a change tendency of the electric current or the torque changes.
Japanese Laid-open Patent Publication No. 2008-307595 discloses a method for determining a position of a spot welding robot. In the method, while a movable side electrode is made to move in a direction to move close to an opposite side electrode, an electric current value of a servomotor which drives the movable side electrode is monitored. Subsequently, when the electric current value exceeds a predetermined value, a movement of the movable side electrode is stopped. Then, based on a space between the movable side electrode and the opposite side electrode, a teaching position of the opposite side electrode is set.
In a control for detecting a position of the workpiece as disclosed in the above patent literatures, the electric current of the servomotor which drives the movable electrode or the robot is monitored, thereby a contact of the electrode with the workpiece is detected. Then, a position of the workpiece is detected based on a position of the movable electrode at the instant.
The spot welding system can perform welding at a plurality of welding points on a single workpiece. In the workpiece, a material and a plate thickness may differ with respect to each welding point. Further, relative positions of welding points in relation to a position at which the workpiece is fixed are different. Accordingly, a rigidity of the workpiece when the electrode is made to come into contact with a predetermined welding point differs with respect to each welding point.
In addition, in the control of detecting a position of the workpiece, depending on a posture of the spot welding gun relative to the workpiece, a fluctuation of the electric current or the torque of the servomotor for a relative movement occurs. Since a posture of the workpiece and the robot when welding is performed differs with respect to each welding point, the fluctuation of the electric current or the torque of the servomotor differs with respect to each welding point.
In the above patent literatures, a method of detecting a position of the workpiece without consideration of the rigidity of the workpiece at a welding point and a direction of the welding point is disclosed. A parameter of the servomotor such as a movement speed of the movable electrode is set to be constant with respect to every welding point. As the parameter of the servomotor, a parameter determined from experience, a parameter determined with reference to a standard welding point, or a parameter determined by selecting a representative welding point from the workpiece is used.
However, the servomotor is driven using the constant parameter with respect to a plurality of welding points, which may cause a time of the position detection control to be long, and may cause a position detection accuracy to decrease. For example, at a welding point at which the rigidity of the workpiece is high, a movement speed of the movable electrode and the robot can be higher. However, since the movement speed is not changed in accordance with welding points, the time may be long. On the other hand, at a welding point at which the rigidity of the workpiece is low, the position detection accuracy may deteriorate.
Further, as a judgement value for judging the contact of the electrode with the workpiece as well, a judgement value determined from experience, a judgement value determined from a posture at a standard welding point (generally, a posture in which the electrode extends in a vertical direction), or a judgement value determined by selecting a representative welding point from the workpiece is used. Consequently, when the fluctuation of the electric current or the torque is small, the time of the position detection control more than necessary may be employed. Further, when the fluctuation of the electric current or the torque is large, an erroneous judgement may be made.